 //通用的道具类
function Item(type,speed){

	var html = "";
	var _timer = null;

	

	this.draw = function(){



		_timer = setInterval(function(){

			if(type == 'medicine'){
				var itop = Math.ceil( getScreenHeight() * Math.random() );
		 		var ileft = Math.ceil(getScreenWidth() * Math.random() );
		 		
		 		/*console.log(itop + "," + ileft);
		 		return;*/
				html = "<div class='medicine' style='top:"+itop+"px;left:"+ileft+"px'></div>";
		 	}else if(type == 'gold'){

		 		var itop = Math.ceil( getScreenHeight() * Math.random() );
		 		var ileft = Math.ceil(getScreenWidth() * Math.random() );

		 		html= "<img src='img/gold/左斜转0000.png' class='gold'style='top:"+itop+"px;left:"+ileft+"px'></img>";

		 		if($(".gold").length >= 10) return;
		 			

		 	}

			$("body").append(html);

		},speed);
	};

	this.pause = function(){
		clearInterval(_timer);
	}

	

};
